<template>
  <div>
    <el-button size="small" @click="tableToExcel">点击导出</el-button>
  </div>
</template>

<script>
  import request from '@/utils/request.js'
  import fileDownload from 'js-file-download'
  export default {
    data() {
      return {
        da: [],
        dalen: 0,
        fileName: "",
        downtemp: false
      }
    },

    methods: {

      //导入excel表，将表格信息写入json文件
      tableToExcel() {
        let jsonData = []

        this.$http.get(process.env.VUE_APP_BASE_API + "/common/exports").then(res => {
          this.download(res.body.msg)
        })
      }
    }
  }
</script>

<style lang="scss" scoped>
  .div_cls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

</style>
